#!/bin/bash
# trigger_jenkins.sh

JENKINS_URL="http://172.20.20.28:8080"
JOB_NAME="contract-tenant-service-vue"
TOKEN="vue-trigger-2025"
USERNAME="hejianyi"
API_TOKEN="0b6e0d07-9dd1-4b33-8606-41f2227b87ab	"

# 使用curl调用Jenkins
curl -X POST \
  -u "${USERNAME}:${API_TOKEN}" \
  "${JENKINS_URL}/jenkins/job/${JOB_NAME}/build?token=${TOKEN}&delay=0sec"

echo "Jenkins任务已触发 - $(date)"